import { http } from "@/utils/http";

type ResultTable = {
  [x: string]: any;
  total?: number;
  data?: Array<any>;
};

//查询消息列表
export const queryById = (data?: object) => {
  return http.request<ResultTable>("post", `/sharing/api/v1/message/query`, {
    data
  });
};

// 查询当前的消息数量
export const queryUndoCount = (data?: object) => {
  return http.request<Record<string, any>>("post", `/sharing/api/v1/message/count`, {
    data
  });
};

// 调用该接口模拟已读
export const setMessageRead = (data?: object) => {
  return http.request("post", `/sharing/api/v1/message/get`, {
    data
  });
};
